Integrand size = 21, antiderivative size = 128 \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {3 \left (2 a^2-b^2\right ) x}{2 b^4}-\frac {6 a \sqrt {a^2-b^2} \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^4 d}+\frac {3 \cos (c+d x) (2 a-b \sin (c+d x))}{2 b^3 d}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))} \]
3/2*(2*a^2-b^2)*x/b^4+3/2*cos(d*x+c)*(2*a-b*sin(d*x+c))/b^3/d-cos(d*x+c)^3 /b/d/(a+b*sin(d*x+c))-6*a*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2)) *(a^2-b^2)^(1/2)/b^4/d
Leaf count is larger than twice the leaf count of optimal. \(448\) vs. \(2(128)=256\).
Time = 3.93 (sec) , antiderivative size = 448, normalized size of antiderivative = 3.50 \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\cos ^3(c+d x) \left (-12 a (a-b) \text {arctanh}\left (\frac {\sqrt {a-b} \sqrt {-\frac {b (1+\sin (c+d x))}{a-b}}}{\sqrt {a+b} \sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}}}\right ) \sqrt {1-\sin (c+d x)} (a+b \sin (c+d x))+\sqrt {a+b} \left (12 a \sqrt {a-b} \text {arctanh}\left (\frac {\sqrt {\frac {b (1+\sin (c+d x))}{-a+b}}}{\sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}}}\right ) \sqrt {1-\sin (c+d x)} (a+b \sin (c+d x))+\sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}} \left (6 \sqrt {b} (-2 a+b) \text {arcsinh}\left (\frac {\sqrt {a-b} \sqrt {-\frac {b (1+\sin (c+d x))}{a-b}}}{\sqrt {2} \sqrt {b}}\right ) (a+b \sin (c+d x))+\sqrt {a-b} \sqrt {1-\sin (c+d x)} \sqrt {\frac {b (1+\sin (c+d x))}{-a+b}} \left (-6 a^2+2 b^2-3 a b \sin (c+d x)+b^2 \sin ^2(c+d x)\right )\right )\right )\right )}{2 (a-b)^{3/2} b^2 \sqrt {a+b} d (1-\sin (c+d x))^{3/2} \sqrt {-\frac {b (-1+\sin (c+d x))}{a+b}} \left (-\frac {b (1+\sin (c+d x))}{a-b}\right )^{3/2} (a+b \sin (c+d x))} \]
(Cos[c + d*x]^3*(-12*a*(a - b)*ArcTanh[(Sqrt[a - b]*Sqrt[-((b*(1 + Sin[c + d*x]))/(a - b))])/(Sqrt[a + b]*Sqrt[-((b*(-1 + Sin[c + d*x]))/(a + b))])] *Sqrt[1 - Sin[c + d*x]]*(a + b*Sin[c + d*x]) + Sqrt[a + b]*(12*a*Sqrt[a - b]*ArcTanh[Sqrt[(b*(1 + Sin[c + d*x]))/(-a + b)]/Sqrt[-((b*(-1 + Sin[c + d *x]))/(a + b))]]*Sqrt[1 - Sin[c + d*x]]*(a + b*Sin[c + d*x]) + Sqrt[-((b*( -1 + Sin[c + d*x]))/(a + b))]*(6*Sqrt[b]*(-2*a + b)*ArcSinh[(Sqrt[a - b]*S qrt[-((b*(1 + Sin[c + d*x]))/(a - b))])/(Sqrt[2]*Sqrt[b])]*(a + b*Sin[c + d*x]) + Sqrt[a - b]*Sqrt[1 - Sin[c + d*x]]*Sqrt[(b*(1 + Sin[c + d*x]))/(-a + b)]*(-6*a^2 + 2*b^2 - 3*a*b*Sin[c + d*x] + b^2*Sin[c + d*x]^2)))))/(2*( a - b)^(3/2)*b^2*Sqrt[a + b]*d*(1 - Sin[c + d*x])^(3/2)*Sqrt[-((b*(-1 + Si n[c + d*x]))/(a + b))]*(-((b*(1 + Sin[c + d*x]))/(a - b)))^(3/2)*(a + b*Si n[c + d*x]))
Time = 0.65 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.13, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3172, 3042, 3344, 25, 3042, 3214, 3042, 3139, 1083, 217}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^4}{(a+b \sin (c+d x))^2}dx\) |
\(\Big \downarrow \) 3172 |
\(\displaystyle -\frac {3 \int \frac {\cos ^2(c+d x) \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3 \int \frac {\cos (c+d x)^2 \sin (c+d x)}{a+b \sin (c+d x)}dx}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3344 |
\(\displaystyle -\frac {3 \left (\frac {\int -\frac {a b+\left (2 a^2-b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {3 \left (-\frac {\int \frac {a b+\left (2 a^2-b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3 \left (-\frac {\int \frac {a b+\left (2 a^2-b^2\right ) \sin (c+d x)}{a+b \sin (c+d x)}dx}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle -\frac {3 \left (-\frac {\frac {x \left (2 a^2-b^2\right )}{b}-\frac {2 a \left (a^2-b^2\right ) \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {3 \left (-\frac {\frac {x \left (2 a^2-b^2\right )}{b}-\frac {2 a \left (a^2-b^2\right ) \int \frac {1}{a+b \sin (c+d x)}dx}{b}}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle -\frac {3 \left (-\frac {\frac {x \left (2 a^2-b^2\right )}{b}-\frac {4 a \left (a^2-b^2\right ) \int \frac {1}{a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d}}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -\frac {3 \left (-\frac {\frac {8 a \left (a^2-b^2\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d}+\frac {x \left (2 a^2-b^2\right )}{b}}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {3 \left (-\frac {\frac {x \left (2 a^2-b^2\right )}{b}-\frac {4 a \sqrt {a^2-b^2} \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b d}}{2 b^2}-\frac {\cos (c+d x) (2 a-b \sin (c+d x))}{2 b^2 d}\right )}{b}-\frac {\cos ^3(c+d x)}{b d (a+b \sin (c+d x))}\) |
-(Cos[c + d*x]^3/(b*d*(a + b*Sin[c + d*x]))) - (3*(-1/2*(((2*a^2 - b^2)*x) /b - (4*a*Sqrt[a^2 - b^2]*ArcTan[(2*b + 2*a*Tan[(c + d*x)/2])/(2*Sqrt[a^2 - b^2])])/(b*d))/b^2 - (Cos[c + d*x]*(2*a - b*Sin[c + d*x]))/(2*b^2*d)))/b
3.5.45.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + 1))), x] + Simp[g^2*((p - 1)/(b*(m + 1))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1)*Sin[e + f*x], x], x] /; Fre eQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && I ntegersQ[2*m, 2*p]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*(g* Cos[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*((b*c*(m + p + 1) - a*d* p + b*d*(m + p)*Sin[e + f*x])/(b^2*f*(m + p)*(m + p + 1))), x] + Simp[g^2*( (p - 1)/(b^2*(m + p)*(m + p + 1))) Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Si n[e + f*x])^m*Simp[b*(a*d*m + b*c*(m + p + 1)) + (a*b*c*(m + p + 1) - d*(a^ 2*p - b^2*(m + p)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[a^2 - b^2, 0] && GtQ[p, 1] && NeQ[m + p, 0] && NeQ[m + p + 1 , 0] && IntegerQ[2*m]
Time = 1.46 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.72
method | result | size |
derivativedivides | \(\frac {\frac {\frac {2 \left (\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}}{2}+2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{2}}{2}+2 a b \right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+3 \left (2 a^{2}-b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}-\frac {2 \left (\frac {-\frac {\left (a^{2}-b^{2}\right ) b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}-b \left (a^{2}-b^{2}\right )}{a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a}+3 a \sqrt {a^{2}-b^{2}}\, \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )\right )}{b^{4}}}{d}\) | \(220\) |
default | \(\frac {\frac {\frac {2 \left (\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{2}}{2}+2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b -\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b^{2}}{2}+2 a b \right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+3 \left (2 a^{2}-b^{2}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}-\frac {2 \left (\frac {-\frac {\left (a^{2}-b^{2}\right ) b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}-b \left (a^{2}-b^{2}\right )}{a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a}+3 a \sqrt {a^{2}-b^{2}}\, \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )\right )}{b^{4}}}{d}\) | \(220\) |
risch | \(\frac {3 x \,a^{2}}{b^{4}}-\frac {3 x}{2 b^{2}}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 b^{2} d}+\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{b^{3} d}+\frac {a \,{\mathrm e}^{-i \left (d x +c \right )}}{b^{3} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 b^{2} d}-\frac {2 i \left (a^{2}-b^{2}\right ) \left (i b +a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{b^{4} d \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+i b \right )}+\frac {3 \sqrt {-a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {-i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{4}}-\frac {3 \sqrt {-a^{2}+b^{2}}\, a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a +\sqrt {-a^{2}+b^{2}}}{b}\right )}{d \,b^{4}}\) | \(256\) |
1/d*(2/b^4*((1/2*tan(1/2*d*x+1/2*c)^3*b^2+2*tan(1/2*d*x+1/2*c)^2*a*b-1/2*t an(1/2*d*x+1/2*c)*b^2+2*a*b)/(1+tan(1/2*d*x+1/2*c)^2)^2+3/2*(2*a^2-b^2)*ar ctan(tan(1/2*d*x+1/2*c)))-2/b^4*((-(a^2-b^2)*b^2/a*tan(1/2*d*x+1/2*c)-b*(a ^2-b^2))/(a*tan(1/2*d*x+1/2*c)^2+2*b*tan(1/2*d*x+1/2*c)+a)+3*a*(a^2-b^2)^( 1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2-b^2)^(1/2))))
Time = 0.31 (sec) , antiderivative size = 411, normalized size of antiderivative = 3.21 \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\left [\frac {b^{3} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a^{3} - a b^{2}\right )} d x + 3 \, {\left (a b \sin \left (d x + c\right ) + a^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right ) + 3 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right ) + 3 \, {\left (a b^{2} \cos \left (d x + c\right ) + {\left (2 \, a^{2} b - b^{3}\right )} d x\right )} \sin \left (d x + c\right )}{2 \, {\left (b^{5} d \sin \left (d x + c\right ) + a b^{4} d\right )}}, \frac {b^{3} \cos \left (d x + c\right )^{3} + 3 \, {\left (2 \, a^{3} - a b^{2}\right )} d x + 6 \, {\left (a b \sin \left (d x + c\right ) + a^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right ) + 3 \, {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right ) + 3 \, {\left (a b^{2} \cos \left (d x + c\right ) + {\left (2 \, a^{2} b - b^{3}\right )} d x\right )} \sin \left (d x + c\right )}{2 \, {\left (b^{5} d \sin \left (d x + c\right ) + a b^{4} d\right )}}\right ] \]
[1/2*(b^3*cos(d*x + c)^3 + 3*(2*a^3 - a*b^2)*d*x + 3*(a*b*sin(d*x + c) + a ^2)*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c ) - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)) + 3*(2*a^2 *b - b^3)*cos(d*x + c) + 3*(a*b^2*cos(d*x + c) + (2*a^2*b - b^3)*d*x)*sin( d*x + c))/(b^5*d*sin(d*x + c) + a*b^4*d), 1/2*(b^3*cos(d*x + c)^3 + 3*(2*a ^3 - a*b^2)*d*x + 6*(a*b*sin(d*x + c) + a^2)*sqrt(a^2 - b^2)*arctan(-(a*si n(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c))) + 3*(2*a^2*b - b^3)*cos(d* x + c) + 3*(a*b^2*cos(d*x + c) + (2*a^2*b - b^3)*d*x)*sin(d*x + c))/(b^5*d *sin(d*x + c) + a*b^4*d)]
Timed out. \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.33 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.84 \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {3 \, {\left (2 \, a^{2} - b^{2}\right )} {\left (d x + c\right )}}{b^{4}} - \frac {12 \, {\left (a^{3} - a b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2}} b^{4}} + \frac {2 \, {\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, a\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} b^{3}} + \frac {4 \, {\left (a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3} - a b^{2}\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )} a b^{3}}}{2 \, d} \]
1/2*(3*(2*a^2 - b^2)*(d*x + c)/b^4 - 12*(a^3 - a*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2*c) + b)/sqrt(a^2 - b^2) ))/(sqrt(a^2 - b^2)*b^4) + 2*(b*tan(1/2*d*x + 1/2*c)^3 + 4*a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c) + 4*a)/((tan(1/2*d*x + 1/2*c)^2 + 1)^2* b^3) + 4*(a^2*b*tan(1/2*d*x + 1/2*c) - b^3*tan(1/2*d*x + 1/2*c) + a^3 - a* b^2)/((a*tan(1/2*d*x + 1/2*c)^2 + 2*b*tan(1/2*d*x + 1/2*c) + a)*a*b^3))/d
Time = 5.94 (sec) , antiderivative size = 601, normalized size of antiderivative = 4.70 \[ \int \frac {\cos ^4(c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {2\,\left (3\,a^2-b^2\right )}{b^3}+\frac {6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{b^3}+\frac {6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2-b^2\right )}{b^3}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (9\,a^2-2\,b^2\right )}{a\,b^2}+\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,a^2-b^2\right )}{a\,b^2}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (3\,a^2-2\,b^2\right )}{a\,b^2}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}+\frac {6\,a\,\mathrm {atanh}\left (\frac {432\,a^3\,\sqrt {b^2-a^2}}{432\,a^3\,b-\frac {432\,a^5}{b}-864\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+864\,a^2\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {864\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {b^2-a^2}}{432\,a^3-\frac {432\,a^5}{b^2}+864\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {864\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}+\frac {432\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {b^2-a^2}}{432\,a^5+864\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b-432\,a^3\,b^2-864\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^3}\right )\,\sqrt {b^2-a^2}}{b^4\,d}-\frac {\mathrm {atan}\left (\frac {432\,a^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{432\,a^5-648\,a^3\,b^2+216\,a\,b^4}-\frac {648\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{216\,a\,b^2-648\,a^3+\frac {432\,a^5}{b^2}}+\frac {216\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{216\,a-\frac {648\,a^3}{b^2}+\frac {432\,a^5}{b^4}}\right )\,\left (a^2\,2{}\mathrm {i}-b^2\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{b^4\,d} \]
((2*(3*a^2 - b^2))/b^3 + (6*a^2*tan(c/2 + (d*x)/2)^4)/b^3 + (6*tan(c/2 + ( d*x)/2)^2*(2*a^2 - b^2))/b^3 + (tan(c/2 + (d*x)/2)*(9*a^2 - 2*b^2))/(a*b^2 ) + (4*tan(c/2 + (d*x)/2)^3*(3*a^2 - b^2))/(a*b^2) + (tan(c/2 + (d*x)/2)^5 *(3*a^2 - 2*b^2))/(a*b^2))/(d*(a + 2*b*tan(c/2 + (d*x)/2) + 3*a*tan(c/2 + (d*x)/2)^2 + 3*a*tan(c/2 + (d*x)/2)^4 + a*tan(c/2 + (d*x)/2)^6 + 4*b*tan(c /2 + (d*x)/2)^3 + 2*b*tan(c/2 + (d*x)/2)^5)) - (atan((432*a^5*tan(c/2 + (d *x)/2))/(216*a*b^4 + 432*a^5 - 648*a^3*b^2) - (648*a^3*tan(c/2 + (d*x)/2)) /(216*a*b^2 - 648*a^3 + (432*a^5)/b^2) + (216*a*tan(c/2 + (d*x)/2))/(216*a - (648*a^3)/b^2 + (432*a^5)/b^4))*(a^2*2i - b^2*1i)*3i)/(b^4*d) + (6*a*at anh((432*a^3*(b^2 - a^2)^(1/2))/(432*a^3*b - (432*a^5)/b - 864*a^4*tan(c/2 + (d*x)/2) + 864*a^2*b^2*tan(c/2 + (d*x)/2)) + (864*a^2*tan(c/2 + (d*x)/2 )*(b^2 - a^2)^(1/2))/(432*a^3 - (432*a^5)/b^2 + 864*a^2*b*tan(c/2 + (d*x)/ 2) - (864*a^4*tan(c/2 + (d*x)/2))/b) + (432*a^4*tan(c/2 + (d*x)/2)*(b^2 - a^2)^(1/2))/(432*a^5 - 432*a^3*b^2 + 864*a^4*b*tan(c/2 + (d*x)/2) - 864*a^ 2*b^3*tan(c/2 + (d*x)/2)))*(b^2 - a^2)^(1/2))/(b^4*d)